<template>
    <div class="stock-wrapper ui pc">
        <div class="ui red message"><i class="warning circle icon"></i>商品库存不可自定义配置</div>
        <div class="date-model">
            <label><input type="radio"  checked value="0" class="hidden" v-model="datePicker">
           日历模式</label>
            <label><input type="radio" v-model="datePicker" value="1" class="hidden">
            单一模式</label>
        </div>
        <component :is="componentName"></component>
    </div>
</template>
<script>
    import tool from 'src/util/tool';
    import util from '_util/index';
    import logic from '_logic';

    //子组件
    import singleStock from '../../stock/singleStock.vue'
    import dateStock from '../../stock/dateStock.vue'

    export default {
        components:{
            singleStock,dateStock
        },
        data() {
            return {
                val: null,
                attrs: [],
                units: [],
                datePicker:'0'
            }
        },
        watch: {},
        methods: {},
        computed: {
            componentName(){
                return this.datePicker*1?'singleStock':'dateStock'
            }
        },
        mounted() {

        },
        props: [],
        created() {

        },
        mounted(){

        }
    }
</script>
<style scoped lang="less">
    .stock-wrapper{
        .date-model{
            font-size: 18px;
        }
        .stock-action{
            text-align: center;
            margin-top: 20px;
        }
    }
</style>
